package com.xszx.entity.dto.goods;

import java.io.Serializable;
import java.util.Objects;

/**
 * 更新货物需要的参数
 * 注意：这里的参数是根据前端传来的参数来的，所以需要和前端的参数一致
 */
public class GoodsUpdateRequest implements Serializable {

    /**
     * 货物id
     */
    private Integer gid;

    /**
     * 货物批次
     */
    private String code;

    /**
     * 货物名称
     */
    private String name;

    /**
     * 货物类型
     */
    private String type;

    /**
     * 入库数量
     */
    private Integer initNum;

    /**
     * 货物价格
     */
    private Integer money;

    /**
     * 实际货物数量
     */
    private Integer nowNum;

    /**
     * 货物状态
     */
    private String state;

    /**
     * 存放时间
     */
    private Integer time;

    /**
     * 占用空间
     */
    private Integer area;

    /**
     * 区域编号
     */
    private String rCode;

    public GoodsUpdateRequest() {
    }

    public GoodsUpdateRequest(Integer gid, String code, String name, String type, Integer initNum, Integer money, Integer nowNum, String state, Integer time, Integer area, String rCode) {
        this.gid = gid;
        this.code = code;
        this.name = name;
        this.type = type;
        this.initNum = initNum;
        this.money = money;
        this.nowNum = nowNum;
        this.state = state;
        this.time = time;
        this.area = area;
        this.rCode = rCode;
    }

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getInitNum() {
        return initNum;
    }

    public void setInitNum(Integer initNum) {
        this.initNum = initNum;
    }

    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }

    public Integer getNowNum() {
        return nowNum;
    }

    public void setNowNum(Integer nowNum) {
        this.nowNum = nowNum;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

    public Integer getArea() {
        return area;
    }

    public void setArea(Integer area) {
        this.area = area;
    }

    public String getrCode() {
        return rCode;
    }

    public void setrCode(String rCode) {
        this.rCode = rCode;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        GoodsUpdateRequest that = (GoodsUpdateRequest) o;
        return Objects.equals(gid, that.gid) && Objects.equals(code, that.code) && Objects.equals(name, that.name) && Objects.equals(type, that.type) && Objects.equals(initNum, that.initNum) && Objects.equals(money, that.money) && Objects.equals(nowNum, that.nowNum) && Objects.equals(state, that.state) && Objects.equals(time, that.time) && Objects.equals(area, that.area) && Objects.equals(rCode, that.rCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(gid, code, name, type, initNum, money, nowNum, state, time, area, rCode);
    }

    @Override
    public String toString() {
        return "GoodsUpdateRequest{" +
                "gid=" + gid +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", initNum=" + initNum +
                ", money=" + money +
                ", nowNum=" + nowNum +
                ", state='" + state + '\'' +
                ", time=" + time +
                ", area=" + area +
                ", rCode='" + rCode + '\'' +
                '}';
    }
}
